@extends('layouts.userctl')
@section('content')
<blockquote class="layui-elem-quote">
	<a style="color:#fff;" href="{{ url('/admin/staff/index') }}" class="layui-btn layui-btn-normal layui-btn-sm" >返  回</a>
	<form action="{{route('admin.staff.daochu')}}" method="get" style="width: 480px;margin-right: 0px;float: right;">
		<div class="layui-inline" style="float: left;">
			<select name="department" style="width: 200px;height: 38px;">
				<option value="">请选择部门</option>
				@foreach($department as $d)
				<option value="{{$d['id']}}">{{$d['department']}}</option>
				@endforeach
			</select>
		</div>
		<div class="layui-inline" style="float: left;">
			<div class="layui-input-inline">
				<input type="text" class="layui-input" id="test3" placeholder="请选择月份" name="month">
			</div>
		</div>
		<button class="layui-btn layui-btn-normal layui-btn-sm" id="searchBtn" style="float: left;">导出</button>
	</form>
</blockquote>

<div class="layui-form">
	<table class="layui-table">
		<colgroup>
			<col width="100">
			<col width="150">
			<col width="150">
			<col width="150">
			<col width="150">
			<col width="150">
			<col width="150">
			<col width="150">
			<col width="150">
		</colgroup>
		<thead>
			<tr>
				<th>序号</th>
				<th>部门</th>
				<th>姓名</th>
				<th>应出勤天数</th>
				<th>实际出勤天数</th>
				<th>迟到次数</th>
				<th>早退次数</th>
				<th>请假天数</th>
				<th>旷工天数</th>
			</tr> 
		</thead>
		<tbody>
			@foreach($user as $u)
			<tr>
				<td>{{$u['i']}}</td>
				<td>{{$u['department']['department']}}</td>
				<td>{{$u['name']}}</td>
				<td>{{$days}}</td>
				<td>{{$u['days']}}</td>
				<td>{{$u['late']}}</td>
				<td>{{$u['early']}}</td>
				<td>{{$u['leave']}}</td>
				<td>0</td>
			</tr>
			@endforeach
		</tbody>
	</table>
</div>

<script src="/component/layui/dist/layui.js" charset="utf-8"></script>
<script>
	layui.use('laydate', function(){
	  var laydate = layui.laydate;
	  
	  //年月选择器
	  laydate.render({
		elem: '#test3'
		,type: 'month'
	  });
  });
  </script>
 @endsection
          